home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / driver.com / MAKEFILE < prev    next >
Encoding:
Text File  |  1991-07-09  |  1.5 KB  |  36 lines

  1. #
  2. # You should assemble, compile, and link first so you can read the map file 
  3. # and then put the appropriate address in the ENDCODE define found in the 
  4. # C file. After setting the correct value recompile and link the modules again.
  5. # DOS 3.0+ lets you use a .EXE device driver, if you want to create a .BIN or
  6. # .SYS file you should remove any references to DGROUP or segment directives
  7. # such as _DATA, _BSS or what ever you called them. This is so no fix-ups
  8. # are generated when using EXE2BIN to create the .BIN file.
  9.  
  10.  
  11. # Note: you will get a "No Stack" warning when linking just ignore it
  12. # unless of course you add a stack segment, I just put the stack in the
  13. # code segment so there is no defined stack segment directive.
  14.     
  15. # The code containing the Header must be the first object file in the list
  16. # to be linked.
  17.     
  18. driver.exe: driver.obj handler.obj
  19.     tlink driver handler,driver,,\tc\lib\cs
  20.  
  21. driver.obj: driver.asm
  22.     tasm /m $*.asm
  23.     
  24. handler.obj: handler.c
  25.     tcc -c -ms $*.c    
  26.     
  27. # Once you are done add the line DEVICE=DRIVER.EXE to your CONFIG.SYS file
  28. # and just reboot. A word of warning, when testing the driver use a floppy,
  29. # if your driver crashes and you booted from your hard drive you won't be able
  30. # to reboot. You could specify DEVICE=B:DRIVER.EXE if your CONFIG.SYS file is
  31. # on your hard disk. If things don't work out just open the drive door when you
  32. # reboot, when DOS trys to load the driver and can't find it, it just displays
  33. # a message and continues on.
  34.     
  35.